### Install Skill from Local Directory Source: https://cosine.sh/docs/customizing/skills Installs a skill from a local filesystem path. ```bash # Install from a local directory cos skills add ./path/to/skills-repo --skill my-skill ``` -------------------------------- ### Deploy Static Site Folder Source: https://cosine.sh/docs/customizing/instant-sites Uploads a static site folder and creates a preview deployment. If the project is not configured, it can guide through setup. ```bash cos deploy ``` -------------------------------- ### Install a Plugin using Shorthand Notations Source: https://cosine.sh/docs/customizing/plugins Shorthand formats for GitHub repositories or domain-prefixed URLs can also be used for plugin installation. ```bash # GitHub shorthand cos plugin install user/my-plugin ``` ```bash # Domain-prefixed cos plugin install github.com/user/my-plugin ``` -------------------------------- ### Install Skill using GitHub Shorthand Source: https://cosine.sh/docs/customizing/skills Installs a skill using a concise GitHub owner/repo format. ```bash # GitHub shorthand also works cos skills add anthropics/skills --skill skill-creator ``` -------------------------------- ### Show All Install Script Options Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Display all available options and flags for the Cosine CLI one-line installation script using the --help flag. ```bash curl -fsSL https://cosine.sh/install | bash -s -- --help ``` -------------------------------- ### Install a Plugin from a Git Repository Source: https://cosine.sh/docs/customizing/plugins Use this command to install a plugin by providing its full git repository URL. ```bash cos plugin install https://github.com/user/my-plugin.git ``` -------------------------------- ### List Installed Plugins Source: https://cosine.sh/docs/customizing/plugins View a list of all installed plugins, their versions, descriptions, and installation paths. ```bash cos plugin list ``` -------------------------------- ### Install Multiple Skills from a Repository Source: https://cosine.sh/docs/customizing/skills Installs selected skills from a larger repository by repeating the --skill flag. ```bash cos skills add anthropics/skills --skill skill-creator --skill pdf ``` -------------------------------- ### Install Skill from GitHub Repository Source: https://cosine.sh/docs/customizing/skills Installs a specific skill from a GitHub repository using its full URL. ```bash # Install a specific skill from a GitHub repo cos skills add https://github.com/anthropics/skills --skill skill-creator ``` -------------------------------- ### Good Context-First Prompt Example Source: https://cosine.sh/docs/learn/plan-it-first This example demonstrates effective context-first prompting by providing all necessary details in a single message, leading to better agent understanding and execution. ```text Add a "Generate Report" button to the analytics dashboard at /src/pages/dashboard.tsx. Follow the pattern used in /src/pages/settings.tsx for the "Update Profile" button — same styling, same modal behavior. The modal should contain a simple form with: - Date range picker (use the existing DatePicker component) - Report type dropdown (options: summary, detailed, export) - Generate button that POSTs to /api/reports Styling should match our design system — see /src/styles/components.md for color tokens and spacing rules. The feature is for marketing managers who need to pull weekly performance data without engineering help. ``` -------------------------------- ### Install CLI with Winget (Windows) Source: https://cosine.sh/docs/cli/quickstart Use this command to install the Cosine CLI on Windows using Winget. Verify the installation by checking the version. ```bash winget install Cosine.CLI cos --version ``` -------------------------------- ### Install CLI with curl (Linux Alternative) Source: https://cosine.sh/docs/cli/quickstart Use this command to install the Cosine CLI on Linux by downloading and executing the installation script. Verify the installation by checking the version. ```bash curl -fsSL https://cosine.sh/install | bash cos --version ``` -------------------------------- ### Start Agent with Prompt from File Source: https://cosine.sh/docs/cli/changelog Use the `--prompt-file` flag to specify a prompt from a file when starting the agent. This is useful for longer or templated prompts. ```bash cos2 start --prompt-file ./task.md ``` -------------------------------- ### Project-Scoped Skill Installation Source: https://cosine.sh/docs/customizing/skills Installs a skill to the project's managed directory, best for project-specific skills. ```bash cos skills add anthropics/skills --skill skill-creator --project ``` -------------------------------- ### File System Operation Example Source: https://cosine.sh/docs/mcp/server-management Example interaction where the user requests to read a file, and Cosine CLI uses the `mcp_filesystem` tool to perform the operation. ```text You: Read the README.md file in my documents folder Cosine: I'll read that file for you. [Uses mcp_filesystem tool] ``` -------------------------------- ### Python MCP Server Example Source: https://cosine.sh/docs/mcp/server-management A basic example of an MCP server written in Python. It defines a single tool 'search_docs' and runs the server. ```python from mcp.server import Server from mcp.types import TextContent app = Server("my-server") @app.tool() def search_docs(query: str) -> str: """Search documentation for a query.""" # Your implementation here return f"Results for: {query}" if __name__ == "__main__": app.run() ``` -------------------------------- ### Global Skill Installation Source: https://cosine.sh/docs/customizing/skills Installs a skill to the global managed directory, suitable for personal skills used across sessions. ```bash cos skills add anthropics/skills --skill skill-creator --global ``` -------------------------------- ### Poor Context-Dribbling Prompt Example Source: https://cosine.sh/docs/learn/plan-it-first This example shows a common mistake of providing instructions incrementally, which leads to less effective agent performance. ```text > Add a button to the dashboard > Actually make it blue > And it should open a modal > The modal should have a form > Use the same pattern as the user settings page ``` -------------------------------- ### Start with a Specific Profile Source: https://cosine.sh/docs/cli/config Use the `--profile` flag with the `cos start` command to activate a named configuration profile. This allows for distinct settings for different environments like work or personal use. ```bash # Use work profile cos --profile work start # Use personal profile cos --profile personal start ``` -------------------------------- ### Install Cosine CLI via Direct Download (Linux) Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Install the Cosine CLI on Linux by downloading the binary directly. Extract the archive and move the binary to a directory in your PATH. ```bash unzip cos-linux-amd64.zip sudo mv cos /usr/local/bin/ cos --version ``` -------------------------------- ### Basic Skill Installation Command Source: https://cosine.sh/docs/customizing/skills The fundamental command to add a skill from a specified source. ```bash cos skills add ``` -------------------------------- ### Start Chrome with Remote Debugging Source: https://cosine.sh/docs/cli/config/flags Instructions for starting Chrome with remote debugging enabled, necessary for using the `--cdp-url` flag with local or remote Chrome instances. ```bash # macOS open -n -a "Google Chrome" --args --remote-debugging-port=9222 --user-data-dir=/tmp/cosine-chrome ``` ```bash # Linux google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/cosine-chrome ``` -------------------------------- ### TypeScript MCP Server Example Source: https://cosine.sh/docs/mcp/server-management A basic example of an MCP server written in TypeScript. It sets up a server, defines a request handler for a 'search_docs' tool, and connects using stdio transport. ```typescript import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; const server = new Server( { name: "my-server", version: "1.0.0", }, { capabilities: { tools: {}, }, }, ); server.setRequestHandler(CallToolRequestSchema, async (request) => { if (request.params.name === "search_docs") { const { query } = request.params.arguments; return { content: [{ type: "text", text: `Results for: ${query}` }], }; } throw new Error("Tool not found"); }); const transport = new StdioServerTransport(); await server.connect(transport); ``` -------------------------------- ### Verify Cosine CLI Installation Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli After installation via the one-line script, open a new terminal or source the output of the installer, then verify the installation by checking the CLI version. ```bash cos --version ``` -------------------------------- ### Build and Deploy Static Sites Source: https://cosine.sh/docs/customizing/instant-sites Build your site first, then deploy the generated static output directory. This is suitable for plain HTML/CSS/JS and static builds from frameworks. ```bash pnpm build cos deploy dist ``` -------------------------------- ### Install CLI with Homebrew (macOS/Linux) Source: https://cosine.sh/docs/cli/quickstart Use this command to install the Cosine CLI on macOS or Linux using Homebrew. Verify the installation by checking the version. ```bash brew install CosineAI/tap/cos cos --version ``` -------------------------------- ### Initialize Content Agent Folder Source: https://cosine.sh/docs/learn/automating-content-research Create a new directory for your blog posts and initialize it as a Cosine agent folder. ```bash mkdir ~/blog-posts cd ~/blog-posts cos init ``` -------------------------------- ### Example Workflow: Line Up Multiple Follow-up Tasks (Queue) Source: https://cosine.sh/docs/cli/queueing-and-nudging Steps to line up multiple follow-up tasks using the queue behavior in Cosine CLI. ```text 1. Ask Cosine to implement the main feature 2. While it is running, type: "Add tests for the new behavior" and press Ctrl+Q 3. Type: "Update the docs for this change" and press Ctrl+Q ``` -------------------------------- ### Prevent Path Modification during Install Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Use the --no-modify-path flag with the one-line installation script to prevent the installer from automatically updating your shell startup files. ```bash curl -fsSL https://cosine.sh/install | bash -s -- --no-modify-path ``` -------------------------------- ### Install Specific Cosine CLI Version Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Customize the one-line installation script to install a specific version of the Cosine CLI, such as a nightly build or a tagged release. ```bash curl -fsSL https://cosine.sh/install | bash -s -- --version nightly ``` ```bash curl -fsSL https://cosine.sh/install | bash -s -- --version nightly-838 ``` ```bash curl -fsSL https://cosine.sh/install | bash -s -- --version v1.2.3 ``` -------------------------------- ### Show Production Configuration Source: https://cosine.sh/docs/customizing/instant-sites Shows the project’s current Instant Sites production configuration. ```bash cos deploy config ``` -------------------------------- ### Install Cosine CLI via Scoop (Windows) Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Add the CosineAI Scoop bucket and install the Cosine CLI using the Scoop package manager. This is a community-maintained installation method. ```powershell scoop bucket add cosine https://github.com/CosineAI/scoop-bucket scoop install cos ``` -------------------------------- ### Deploy and Promote Site from CLI Source: https://cosine.sh/docs/cloud/instant-sites-domains This command deploys the built site and immediately promotes it to production in a single step. This is useful for ensuring the latest deployment is live. ```bash cos deploy --promote dist ``` -------------------------------- ### Install Cosine CLI to Specific Directory Source: https://cosine.sh/docs/cli/install-and-authenticate-the-cli Use the one-line installation script to install the Cosine CLI into a custom directory. This can be done using the --install-dir flag or the COSINE_INSTALL_DIR environment variable. ```bash curl -fsSL https://cosine.sh/install | bash -s -- --install-dir "$HOME/bin" ``` ```bash COSINE_INSTALL_DIR="$HOME/bin" curl -fsSL https://cosine.sh/install | bash ``` -------------------------------- ### Create and Navigate to a New Project Folder Source: https://cosine.sh/docs/learn/managing-context-with-folders Use these commands to create a new directory for your agent project and then change into that directory. ```bash mkdir ~/social-posts cd ~/social-posts ``` -------------------------------- ### Example: Taking Screenshots with Browser Tools Source: https://cosine.sh/docs/customizing/browser Demonstrates how Cosine CLI uses `browser_navigate` and `browser_screenshot` tools to take a screenshot of a deployed application. ```text You: Take a screenshot of my deployed app at https://myapp.com Cosine: I'll navigate to your app and capture a screenshot. [Uses browser_navigate and browser_screenshot tools] ``` -------------------------------- ### Initialize Sales Outreach Folder Source: https://cosine.sh/docs/learn/creating-a-sales-outreach-agent Create a dedicated directory for your sales outreach agent and initialize the Cosine CLI. ```bash mkdir ~/sales-outreach cd ~/sales-outreach cos init ``` -------------------------------- ### Install Skill from GitHub Tree URL or Subpath Source: https://cosine.sh/docs/customizing/skills Installs a skill from a specific branch or subdirectory within a GitHub repository. ```bash # Install from a GitHub tree URL or subpath cos skills add https://github.com/anthropics/skills/tree/main/skills --skill skill-creator ``` -------------------------------- ### Verify Claude Code CLI Installation Source: https://cosine.sh/docs/cli/login-with-claude After installing the Claude Code CLI, confirm that the 'claude' command is available in your terminal. ```bash claude --version ``` -------------------------------- ### Initialize a Summarization Agent Folder Source: https://cosine.sh/docs/learn/building-a-summarization-agent Create a new directory for your summarization agent and initialize it with the Cosine CLI. This sets up the necessary configuration files. ```bash mkdir ~/call-summaries cd ~/call-summaries cos init ``` -------------------------------- ### Deploy a Site from a Specific Path Source: https://cosine.sh/docs/customizing/instant-sites Deploy a website by providing the full path to its built output folder. ```bash cos deploy ./apps/website/out ``` -------------------------------- ### Example DNS Target Source: https://cosine.sh/docs/cloud/instant-sites-domains This is an example of a DNS target that a custom hostname should resolve to. Ensure your custom hostname resolves to this target. ```dns cosine.page ``` -------------------------------- ### Monorepo Setup: Mark Topmost Config Source: https://cosine.sh/docs/cli/config/toml-config Configure a TOML file to stop parent directory searches in monorepo setups. ```toml is_topmost_config = true ``` -------------------------------- ### Initialize Cosine Configuration Source: https://cosine.sh/docs/cli/quickstart Run this command to create repo-local configuration files for Cosine within your project directory. ```bash cos init ``` -------------------------------- ### Start Cosine CLI in Specific Directory Source: https://cosine.sh/docs/cli/terminal-commands Specify a working directory to start the Cosine TUI or run a one-shot task. ```bash cos start --cwd /path/to/project ``` -------------------------------- ### Example Production Subdomain Source: https://cosine.sh/docs/cloud/instant-sites-domains This is an example of a production subdomain that Cosine will use for your Instant Site. It forms the basis of the built-in production URL. ```text docs-team.cosine.page ``` -------------------------------- ### Example MCP Tool Usage Source: https://cosine.sh/docs/mcp Illustrates a user request and Cosine's response, indicating the use of an mcp_filesystem tool to list files. ```text You: List all files in my projects directory Cosine: I'll list the files for you. [Uses mcp_filesystem tool] ``` -------------------------------- ### Database Query Example Source: https://cosine.sh/docs/mcp/server-management Example interaction where the user asks about tables in a database, and Cosine CLI uses the `mcp_postgres` tool to query the schema. ```text You: What tables are in my postgres database? Cosine: Let me check the database schema. [Uses mcp_postgres tool] ``` -------------------------------- ### Interactive Project Setup Prompt Source: https://cosine.sh/docs/customizing/instant-sites This prompt appears when `cos deploy` is run in a folder without a configured Cosine project, offering to run `cos project init`. ```bash No Cosine project is configured. Run `cos project init` now? [Y/n]: ``` -------------------------------- ### Start a Session with Balanced Reasoning Source: https://cosine.sh/docs/customizing/reasoning Begin a session with a medium reasoning level, providing a good balance between speed and thoroughness. ```bash # Balanced default cos start --reasoning medium ``` -------------------------------- ### Set Startup Mode with --mode Source: https://cosine.sh/docs/cli/config/flags Use the `--mode` flag to set the startup mode for Cosine. The selected mode persists across sessions. Accepted values include `normal`, `auto`, `plan`, and `swarm`. ```bash # Start in plan mode cos start --mode plan ``` ```bash # Start in auto mode cos start --mode auto ``` ```bash # Start in swarm mode cos start --mode swarm ``` ```bash # Start in manual mode (default) cos start --mode manual ``` -------------------------------- ### GitHub Operation Example Source: https://cosine.sh/docs/mcp/server-management Example interaction where the user requests to create a GitHub issue, and Cosine CLI uses the `mcp_github` tool to perform the action. ```text You: Create an issue titled "Bug in login flow" in my repo Cosine: I'll create that issue. [Uses mcp_github tool] ``` -------------------------------- ### Start Agent with Mode and Reasoning Flags Source: https://cosine.sh/docs/cli/changelog Set the agent's mode and reasoning level directly at startup using `--mode` and `--reasoning` flags. Shorthand flags are available for common modes. ```bash cos2 start --mode plan --reasoning high ``` ```bash cos2 start --am # Start in auto mode ``` ```bash cos2 start --pm --reasoning high # Plan mode with high reasoning ``` -------------------------------- ### Deploy Site from CLI Source: https://cosine.sh/docs/cloud/instant-sites-domains Use this command to deploy the built site from your command-line interface. Ensure your build output is in the 'dist' directory. ```bash cos deploy dist ```