CLI utilities for the pMate project
npm install @pmate/cliA TypeScript-powered command-line tool scaffold for future pMate automation.
``bash`
npm install
npm run dev -- --help
- npm run dev executes the TypeScript entry point with ts-node.npm run build
- emits compiled JavaScript into dist/.npm start
- runs the compiled CLI (dist/index.js).
After running npm run build, you can invoke the CLI locally via:
`bash`
node dist/index.js --name Alice
When published or linked (e.g., npm link), the binary will be available as pmate:
`bash`
pmate --help
pmate --name Bob
pmate add-dns --type A --value 1.2.3.4 --rr api
pmate login
pmate sts
pmate oss list
pmate oss upload --file ./path/to/file --key assets/file.txt
pmate pr
pmate commit
pmate commit --push
pmate pr merge
Notes:
- pmate pr normalizes generated PR titles to start with feat: , fix: , or chore: (exactly one space after :).pmate commit
- creates an AI-generated commit from local changes.pmate commit --push
- also pushes the current branch to origin.pmate pr merge
- uses squash merge and deletes the branch by default (--squash --delete-branch).
You can set Aliyun credentials in ~/.pmate/config.yaml:
`bash`
aliyun:
ak: your_ak
sk: your_sk
region: cn-hangzhou
domain: example.com
Add one or more Linear accounts to ~/.pmate/config.yaml:
`bash`
linear:
teamKey: ENG
accounts:
- title: work
apiKey: your_linear_api_key
- title: personal
apiKey: your_other_linear_api_key
When multiple accounts exist, pmate linear will ask you to choose once per working directory and cache it in ~/.pmate/linear-selection.json.
pmate login stores a session token in ~/.pmate/session.json. Commands likepmate sts` require this session; if it is missing, log in first.