Cortex for the CLI
Flash your project knowledge from the command line. Use the Socra CLI to read Modules and track the work that depends on them.
Socra CLI · All integrations
Knowledge in Cortex
Your project requirements
Your team’s standards
The reasons behind each decision
the CLI
Knowledge available before the next action
Read the governing knowledge at the command line
Some agents work through a shell. You may also want to inspect the exact knowledge a coding task depends on from your own terminal.
A Module stores current knowledge about how one part of a system should work and why. When your agent flashes a Module, Cortex returns it with its declared dependencies. Your agent then checks that knowledge against the work in front of it.
Keep the knowledge your next task will need
Save a useful decision with its reason in a Module. When the requirement changes, update that Module so a later flash retrieves the current knowledge. Version history keeps earlier revisions available.
You supply the judgment
Explain the requirement and why it matters. Review what belongs in the shared knowledge.
Your agent retrieves it when needed
The agent finds and flashes the relevant Module before acting, then checks current evidence.
See a recorded Cortex call
In this recorded Codex session, an agent retrieves a Module and its dependencies. Open the full chat to inspect the returned knowledge and the response that follows.

Create knowledge your agent can use again
See how a Module, a dependency, and a flash work together. After connecting Cortex, you can send these prompts to your agent.
Illustrative example: a scheduling app for tutors. Replace the details with your own project and review what your agent saves.
Create a Module
Start with what you are building. A Module gives that knowledge a name your agent can find again.
product holds the purpose of the app and the reason behind it.
Create product
Help me create a product Module in Cortex. We build a scheduling app for independent tutors. Tutors need to manage lessons between teaching sessions. Check for an existing Module first. Save the knowledge and its reason, then tell me what changed and why.Add a dependency
Describe the customer in a separate Module. Make it depend on product because understanding the customer requires knowing what the app does.
product-customer depends on product. The dependency points to the knowledge it needs.
Connect product-customer
Create a product-customer Module in Cortex. Our customers are independent tutors who manage their schedules on a phone between lessons. Add product to its Dependencies. Check existing Modules first. Save the knowledge and dependency, then tell me what changed and why.Flash the connected knowledge
Once both Modules are saved, ask your agent to flash product-customer. Cortex includes product first, then the customer knowledge that depends on it.
The agent receives both Modules in one flash. It can use that knowledge when the next task needs it.
Flash product-customer
Flash product-customer from Cortex. Show me the returned knowledge and identify which Modules were included.
What this flash includes
product
The app’s purpose. Included as a dependency.
product-customer
Who uses the app. The Module you asked to flash.
Connect the CLI to Cortex
Start with one agent. Follow the guide through Account authorization, instructions, and a real connection check.
01
Set up the connection
Install the Socra CLI for your operating system, then add Cortex and sign in. Guided setup provides the platform-specific installer.
Installation commands
socra install cortex socra account login socra cortex map02
Choose your Cortex Account
The Account login opens Socra sign-in in your browser. Choose the Account whose Cortex knowledge you want to use.
New to Cortex? Create your Account. If the agent is already connected to the intended Account, continue.
03
Set up tools and guidance
For an agent that uses the CLI, add the Cortex guidance to its persistent instructions. For a manual terminal session, you choose when to flash.
The CLI runs under the selected Account’s permissions. If an agent runs the commands, its host controls shell confirmations. Your organization’s policy still applies. Follow guided setup.
04
Check the connection
Run socra cortex map and confirm it returns your Module map. An empty map is valid. If an agent will use the CLI, separately check that a new agent session receives the Cortex guidance.
Connection check
socra cortex map
Good to know
What does Cortex add to the CLI?
The Socra CLI lets you flash a named Module with its dependencies. Use the same Account to inspect knowledge and track work from your terminal.
Can I use the same knowledge with another agent?
Yes. Connect each agent to the same Cortex Account. Each can retrieve the Modules it has permission to access. Setup is separate for each agent.
What should I know before connecting?
The CLI needs a shell and a current Socra installation. Run socra update if the local client falls behind the service.
Who controls the knowledge?
Modules have owners and version history. Account permissions control access. Host approval settings control tool confirmations; instructions guide the agent’s behavior. Review changes to shared knowledge with your agent.
Cortex is part of Workspace. See the current plan, trial, and usage terms before you connect.
Use Cortex with your other agents
Connect another agent to the same Account when you need it. Your knowledge stays in Cortex.

