Command Line Interface
The CLI is the main way to configure Bookface. The main functions are to login, refresh credentials, manage saved credentials, and start the MCP server.
Running Commands
Use your preferred package runner.
If you haven't authenticated yet, start with the getting started and authentication guides. Most commands will validate credentials before proceeding.
Authentication
Login
Starts a guided flow that collects your app credentials, generates tokens, and writes a credentials.json
.
Options (all optional):
- --appId: Facebook App ID
- --appSecret: Facebook App Secret
- --appToken: Existing App token
- --userToken: Existing User token
- --userId: Existing User ID
- --pageId: Existing Page ID
- --pageIndex: Page index when selecting a page
- --pageToken: Existing Page token
- --scope: Permissions as a JSON string
- --credentials: Path to read existing creds (defaults to
./credentials.json
) - --path: Path to write final creds file (defaults to
./credentials.json
)
You edit this scope by changing the credentials.json
file created, or by using the --scope
flag.
Refresh
Re-generates fresh tokens using your App ID/Secret and writes them to disk.
Accepts the same options as login
. Tokens are recreated; use this when tokens expire or scopes change.
Credentials
View
Prints the currently resolved credentials (working directory and global fallback).
Clear
Clears saved tokens/IDs in the current working directory file.
Store Globally
Writes a global fallback credentials.json
to your OS config directory so tools can authenticate outside your project folder.
Use this before launching the MCP from IDEs or agents that run in isolated directories.
JSON
Pretty-prints credentials as JSON for quick copy/paste into configs.
Shell
Prints environment variable exports to source into your shell.
MCP
Start the built-in MCP server for agent integrations. See the full guide at MCP.
Streamable HTTP
Starts a local HTTP server. Add --dual
to expose user and page tools together.
stdio (Most clients)
Runs the MCP over stdio. Choose a profile: user
, page
(default), or dual
.
For sandboxed clients (e.g. IDEs), you can execute directly from the registry: