By PipeLedger · Published · Updated
Every way in reads the same approved, published data under the same access rules. None of them can see more than its connection allows. The commands on this page need version 0.1.2 or later of the pl command.
Three ways in
Start in the chat app you already use. Move to an agent on your own computer when you want it to know your business before you ask.
| Way in | Use it for | How it connects | What you hold |
|---|---|---|---|
| Chat app | Questions and reports in a conversation. | A custom connector to the PipeLedger MCP server. | Nothing when you sign in. A Credential ID and a secret when you were issued an access credential. |
| Agent on your computer | Work with several steps, done by an agent that consults your reporting strategy, approved policies, and procedures. | The agent runs the pl command. | One service credential for each organization. |
| Terminal | Checking what a credential can see, and scheduled automation. | The pl command. | The same service credential. |
Connect a chat app
A chat app connects through a custom connector to https://mcp.pipeledger.ai/mcp. There are two routes, and an Owner or Admin chooses by who the person is.
| What differs | Sign in | Access credential |
|---|---|---|
| Who it suits | Controllers and accountants who also work in the PipeLedger application. | People who need answers about their part of the business, such as a project manager, a business unit leader, or a functional director. |
| What the person needs | A PipeLedger member account with multi-factor authentication. | No PipeLedger account. |
| What the connection can see | What an Owner or Admin allowed for that member. The member can reduce it and cannot widen it. | The slice chosen when the credential was issued: a project, a business segment, a function, a region, or a legal entity. |
| What the person holds | Nothing. The chat app keeps its own connection. | A Credential ID and a secret, kept in a password manager and entered once. |
| Choice on the connection screen | Sign in with PipeLedger | Use organization credentials |
Both routes apply the same access rules and leave the same audit record. The difference is what a person can see beyond their own answers. A member can open the PipeLedger application. A person with an access credential sees only answers about their slice.
Issue one access credential for each person. Disabling it ends every connection made with it. The steps and the token lifecycle are in the OAuth connection guide.
Set up an agent on your computer
A working folder gives your agent a consistent reference for how your organization reports and reviews its finances. Keep your instructions, approved policies, and recurring procedures together so the agent can consult them during its work.
Start small: describe the business, explain what you need from reporting, and add one procedure you want help with. Expand the folder as you identify useful guidance.
What useful guidance looks like
You do not need a separate document for every topic. Use existing documents where they are current, and add short notes where important knowledge is still held by individuals.
| Guidance | What to include |
|---|---|
| Business context | What the organization does, its legal entities, business units, projects, and financial year. |
| Reporting strategy | Who receives reports, which decisions they support, reporting frequency, required comparisons, and how commentary should be presented. |
| Chart-of-accounts strategy | How accounts are organized, what each group is intended to capture, naming conventions, and who approves new accounts or classification changes. |
| Accounting policies and account separation | Your approved treatment of recurring transactions, and which items must remain separate: for example operating costs and capital expenditure, project costs and financing, or third-party and intercompany activity. |
| Intercompany policies | Related entities, designated accounts, reconciliation responsibilities, settlement procedures, and how intercompany activity should be presented in reporting. |
| Review procedures | Steps for month-end review, investigating variances, checking balances, documenting exceptions, and escalating questions. |
| Decisions and open questions | Approved decisions with their owner and date, unresolved issues, and what needs a controller's judgment. Keep proposed changes clearly marked. |
The folder
your-organization/
AGENTS.md organization context and working instructions
reference/
reporting-strategy.md
chart-of-accounts.md
accounting-policies.md
intercompany-policy.md
procedures/
month-end-review.md
variance-analysis.md
notes/
decisions.md
open-questions.md
reports/ draft analyses and reviewed reports
.pipeledger.json connection selected for this folderThis is a suggested structure. Replace your-organization with your own folder and profile names throughout this page. Use the instruction filename supported by your agent, and link to the relevant reference documents and procedures from it. Codex reads AGENTS.md and Claude Code reads CLAUDE.md. Keep your existing document formats where practical.
The files guide the agent's work. Editing them does not change account mappings, metric definitions, or access permissions in PipeLedger.
Set it up
- Install the agent and open it on the folder.
- Write the instructions. The starter below is enough to begin with.
- Add the guidance your finance team works from: your reporting strategy, chart-of-accounts structure, accounting policies, rules for keeping accounts and activities separate, intercompany policies, and review procedures. Start with the documents you already use and add context as questions arise.
- Connect the books with the four commands below, then tell the agent to use the
plcommand.
Starter instructions
Before starting, confirm the organization connected through PipeLedger and read the guidance relevant to the task.
Use our reporting strategy and approved accounting policies when preparing analysis. Explain material changes, identify the supporting evidence, and distinguish findings from questions that still need review.
If guidance is missing or conflicts with the data, flag the issue for the controller. Do not invent an accounting policy or silently change a classification.
Save new analysis as a draft. Record proposed policy changes separately from approved decisions.
npm install -g @pipeledger/cli
pl login
pl switch your-organization --here
pl whoamipl login asks for the service credential with a hidden prompt and saves it outside the folder. An Owner or Admin creates that credential in PipeLedger and chooses its role, tools, data, and clearance. The command needs Node.js 20 or later.
| Source | Contribution |
|---|---|
| Your working folder | Business context, reporting requirements, approved policies, and review procedures. |
| PipeLedger | Approved, published financial data, governed definitions, and the supporting evidence available to your connection. |
| The AI agent | Queries, comparisons, investigation, and draft explanations using that data and guidance. |
| The controller | Accounting judgment, review of findings, and decisions about corrections or policy changes. |
Work for several organizations
Each saved credential is a profile: one organization, one name. Keep one folder for each organization and bind it once.
Each organization's folder selects its saved PipeLedger connection unless you explicitly override it. Open the agent in that folder and confirm the organization with pl whoami. File access is controlled by your agent's workspace permissions; the PipeLedger folder binding does not restrict which local files it can read.
YOURS: reused for every organization, holds none of their data
~/work/shared/
procedures/
templates/
ORGANIZATIONS: one folder each
~/work/organizations/
organization-a/
AGENTS.md
reference/ procedures/ notes/ reports/
.pipeledger.json connection for organization A
organization-b/
AGENTS.md
reference/ procedures/ notes/ reports/
.pipeledger.json connection for organization B
CREDENTIALS: private to you
~/.pipeledger/profiles/Set up two organizations
Replace the folder and profile names with your own. Each pl login asks for that organization's service credential.
mkdir -p ~/work/organizations/organization-a
mkdir -p ~/work/organizations/organization-b
pl login --profile organization-a
cd ~/work/organizations/organization-a
pl switch organization-a --here
pl whoami
pl login --profile organization-b
cd ~/work/organizations/organization-b
pl switch organization-b --here
pl whoamiEach pl whoami should name the organization of the folder you are in, and show that the profile was chosen by the folder.
| Command | Use it to |
|---|---|
pl login | Add an organization. Its credential is saved as a profile named after the organization. |
pl login --profile <name> | Save under a name of your choice, for a second credential to the same organization. |
pl switch <name> --here | Bind the folder you are in to that profile. |
pl switch <name> | Make that profile the default outside bound folders. |
pl switch | List the saved profiles and the one in use where you are. |
pl whoami | Show the organization, the profile, how it was chosen, and what the credential can see. |
pl logout | Remove the credential in use from this computer. |
- One session, one organization. Start the agent inside the organization's folder. For another organization, start another session.
- Methods travel. Information does not. A procedure may be copied from your shared folder into an organization's folder. Nothing is copied from one organization to another.
- Bind folders for parallel work. Two agents in two bound folders can work on two organizations at the same time. A default that is switched back and forth is shared by every terminal, so it cannot do that.
What the folder binding does and does not do
- It selects a connection.
.pipeledger.jsonnames the profile and the organization.--profileon a command, orPIPELEDGER_PROFILE, overrides it for that command. - It holds no credential. The folder can be synced or shared. A colleague who receives it must save their own credential for the same organization under the same profile name before the binding works on their computer.
- It does not limit file access. Your agent's workspace permissions decide which local files it can open, including another organization's folder.
- It is not authorization. PipeLedger enforces the credential's permissions on every request, whatever the folder says.
Several legal entities can share one connection and one folder when the credential's permissions cover them.
Where credentials are kept
| Way to hold it | Where it sits | Suits |
|---|---|---|
Saved by pl login | ~/.pipeledger/profiles/, one file for each profile, readable only by your user. | A person at a workstation. |
| Credential file downloaded from PipeLedger | Moved into the same profiles folder. Its file name becomes the profile name. | A computer where nobody can type at a prompt. |
| Supplied when the command runs | PIPELEDGER_CREDENTIAL_SECRET from a secret store, or a file named in PIPELEDGER_CONFIG_FILE. | Scheduled automation. |
| Password manager | Your vault. | The backup copy, and the route for handing a credential to a person. |
The profiles folder is the only place pl looks for saved profiles. A credential never belongs in an organization's folder, a chat message, an email, a screenshot, a typed command, or an agent's instructions.
How a profile is chosen
--profile <name>on the command, orPIPELEDGER_PROFILE.- The folder binding: the nearest
.pipeledger.jsonin the current folder or a folder above it. - The default chosen with
pl switch <name>. - The only saved profile, when exactly one is saved.
When nothing selects a profile, or the selection is missing or unreadable, the command returns a connection error. It never falls through to another organization. Before a financial request, pl also confirms with PipeLedger that the credential belongs to the organization the profile names.
The two automation settings are alternatives to a profile. Combining one with a profile or a bound folder is a conflict, and the command returns a connection error.
Sign out and revoke
These are different acts. pl logout removes a credential from one computer. The credential still works anywhere else it was saved. Revoking it in PipeLedger ends it everywhere, and the next request is refused.
Sign out when you stop working for an organization or change computer. Ask an Owner or Admin to revoke when a credential may have been exposed or a person leaves. After signing out, pl does not choose another organization for you.
If you are an AI agent
These rules apply when you act for a person who uses PipeLedger.
- Run
pl whoamibefore any other request, and state the organization you are working in. - Never ask a person to paste a credential into a conversation, and never write one into a file, a command, or your instructions. Ask them to run
pl loginthemselves. - Do not open, copy, or move files in
~/.pipeledger/. - When a command returns a connection error, report the message. Do not work around it by setting an environment variable, naming another profile, or changing folder.
- Work on one organization in one session. The folder binding does not stop you opening another organization's files, so do not open them, and do not carry figures, notes, or files from one organization's folder into another's.
- If
pl whoamireports a partial ledger, never present a result as the organization's complete ledger. - Return the evidence with the answer. The person reviews it, decides, and acts. PipeLedger does not post journals, send messages, or initiate payments.
Connection errors and how to resolve them
If PipeLedger cannot safely select or authenticate a connection, the command returns an error instead of running the requested operation.
| Message | What it means | What to do |
|---|---|---|
| Several credentials are saved and none is selected | More than one profile exists and nothing chooses between them. | Run pl switch <name>, or bind the folder with pl switch <name> --here. |
| Credential settings conflict | An environment credential or config file is set together with a profile or a bound folder. | Use one or the other. Unset the environment setting, or leave the bound folder. |
| The credential's authenticated organization does not match the selected profile | The saved credential belongs to a different organization than the profile or folder names. | Sign in again with the right organization's credential under a new profile name. |
| This folder is bound to a profile that is not saved | The folder names a profile that does not exist on this computer. | Sign in with pl login --profile <name>, or bind the folder to a saved profile. |
| Not authenticated | No credential is saved and none is supplied. | Run pl login. |
When you contact support, include the error code and any correlation ID shown. See the PipeLedger Tool Guide for what each command returns, and the support page for help.