<@U04UQ68083H> How do I programatically publish a ...
# ory-copilot
b
@chilly-king-10285 How do I programatically publish a local permissions file, written in OPL, to my Ory project?
c
A message from kapa.ai
You can programmatically publish a local permissions file, written in Ory Permission Language (OPL), to your Ory project using the Ory CLI. Here are the steps: 1. First, ensure that you have an active Ory project. You can create one using the CLI or the Ory Console. 2. Once you have your OPL file ready, you can use the
ory update opl
command to update the Ory Permission Language file in your Ory Network project. Here is an example of how to use this command:
Copy code
bash ory update opl <project-id> --file /path/to/your_opl_file.ts
Replace
<project-id>
with your project's ID and
/path/to/your_opl_file.ts
with the path to your OPL file. 3. Alternatively, you can use the
ory patch opl
command to update the Ory Permission Language file in your Ory Network project. Here is an example of how to use this command:
Copy code
bash ory patch opl <project-id> --file /path/to/your_opl_file.ts
Again, replace
<project-id>
with your project's ID and
/path/to/your_opl_file.ts
with the path to your OPL file. Please note that both
ory update opl
and
ory patch opl
commands will overwrite legacy namespace definitions. For more information, you can refer to the following documentation: - [Ory update opl](https://www.ory.sh/docs/cli/ory-update-opl#ory-update-opl) - [Ory patch opl](https://www.ory.sh/docs/cli/ory-patch-opl#ory-patch-opl)