@1medium/cli
v1.7.0
Published
CLI and MCP server for 1Medium AI task management
Maintainers
Readme
@1medium/cli
Command-line interface for 1Medium AI coding agent integration.
Installation
# From npm (when published)
npm install -g @1medium/cli
# From source
cd packages/cli
npm install
npm linkConfiguration
Set your API token:
# Interactive
1m login
# With token directly
1m login --token 1m_pat_xxxxxxxxxxxxx
# Or via environment variable
export ONEMEDIUM_TOKEN=1m_pat_xxxxxxxxxxxxxUsage
Authentication
# Check current token and rate limits
1m whoami
# View configuration
1m config
# Remove credentials
1m logoutTask Management
# Create a task
1m task add --title "Fix authentication bug in login flow" \
--body "The login form fails when..." \
--priority P1 \
--repo owner/repo \
--branch feature/auth-fix
# List tasks
1m task list
1m task list --status open --priority P0
1m task list --repo owner/repo --created-by agent
# Get task details
1m task get <task-id>
# Update a task
1m task update <task-id> --status doing --add-tag in-progress
# Add a comment
1m task comment <task-id> --message "Started working on this"
# Mark as complete
1m task done <task-id> --message "Fixed in commit abc123"JSON Output
All commands support --json flag for machine-readable output:
1m task list --json
1m task get <id> --jsonEnvironment Variables
ONEMEDIUM_TOKEN- API token (overrides stored config)ONEMEDIUM_API_URL- API base URL (default: https://1medium.ai/api)
MCP Server (Claude Code Integration)
This package includes an MCP (Model Context Protocol) server for direct integration with Claude Code.
Setup
Add to your Claude Code MCP config (~/.claude.json):
{
"mcpServers": {
"1medium": {
"command": "1m-mcp"
}
}
}Restart Claude Code, and it will have access to these tools:
| Tool | Description |
|------|-------------|
| task_create | Create tasks with title, body, priority |
| task_list | List tasks filtered by status/priority |
| task_get | Get full task details |
| task_update | Update task properties |
| task_complete | Mark task as done |
| task_comment | Add comments/updates |
Usage
Once configured, ask Claude Code things like:
- "Create a task to fix the authentication bug"
- "Show me my P1 tasks"
- "Mark task ABC as complete"
- "Add a comment to task XYZ saying I'm working on it"
For AI Agents
The CLI is designed for use by AI coding agents like Claude Code, Cursor, and Copilot.
Example workflow for an AI agent:
# Agent creates task for discovered issue
1m task add --title "Security: SQL injection in user search" \
--body "Found potential SQL injection in /api/users/search..." \
--priority P0 \
--repo myorg/myapp \
--file "src/api/users.js" \
--source "claude-code"
# Agent updates progress
1m task comment <id> --message "Implemented parameterized queries"
# Agent marks complete
1m task done <id> --message "Fixed in PR #123"Getting Your API Token
- Go to 1medium.ai
- Navigate to Settings > API Tokens
- Create a new agent token
- Run
1m login --token YOUR_TOKEN
License
MIT
