{"id":31580999,"url":"https://github.com/gnapse/ask","last_synced_at":"2026-05-16T18:02:00.454Z","repository":{"id":315517759,"uuid":"1059833509","full_name":"gnapse/ask","owner":"gnapse","description":"A shell function that lets you ask Claude with natural language arguments.","archived":false,"fork":false,"pushed_at":"2025-09-19T03:27:49.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T04:28:44.168Z","etag":null,"topics":["claude-code","cli","llm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnapse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T02:40:01.000Z","updated_at":"2025-09-19T03:27:52.000Z","dependencies_parsed_at":"2025-09-19T04:28:45.444Z","dependency_job_id":"6458e379-b500-4779-8411-4a878728f7d9","html_url":"https://github.com/gnapse/ask","commit_stats":null,"previous_names":["gnapse/claude-ask"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gnapse/ask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnapse","download_url":"https://codeload.github.com/gnapse/ask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526242,"owners_count":26001325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","cli","llm"],"created_at":"2025-10-05T21:51:59.608Z","updated_at":"2025-10-05T21:52:04.736Z","avatar_url":"https://github.com/gnapse.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ask Claude Code from the CLI\n\nA shell function that lets you ask a quick question to Claude Code with natural language arguments.\n\nIt runs Claude Code in an isolated directory to prevent it from reading or accessing your current directory. This means that you cannot ask questions about your current directory or its content.\n\n## What it does\n\nThe `ask` function:\n\n1. Creates and switches to `~/.claude-ask`\n2. Runs `claude -p` with your arguments\n3. Returns to your original directory\n\n## Usage\n\nYou can use:\n\n```bash\n$ ask how to use gh cli to obtain the current repo url, only the url\n```\n\nThe output would be something like this:\n\n````\nYou can use the following command:\n```bash\ngh repo view --json url --jq .url\n```\n````\n\nYou can also just type `ask` without arguments for interactive input. Interactive mode reads until EOF (Ctrl-D), so multi-line prompts work well and piped input is supported.\n\nExamples:\n\n```bash\n# Multiline interactive prompt (finish with Ctrl-D)\nask\n```\n\n```bash\n# Piped input\nprintf \"line 1\\nline 2\\n\" | ask\n```\n\n## Installation\n\nPrerequisite: Ensure the `claude` CLI is available in your current shell (e.g., `claude --version`). If not, the `ask` function will print an error at runtime.\n\nRun the install script:\n\n```bash\n./install.sh\n```\n\nThen restart your shell or run:\n\n```bash\nsource ~/.bashrc                         # bash\nsource ~/.zshrc                          # zsh\nsource ~/.config/fish/functions/ask.fish # fish\n```\n\nThe installer does not auto-source your shell configuration; it prints clear next steps instead. You can inspect the install script to see exactly what it does and perform the installation manually if preferred.\n\n## Configuration\n\nThe installer sets up a minimal Claude Code configuration in `~/.claude-ask/.claude/settings.local.json` that allows only web search by default:\n\n```json\n{\n  \"permissions\": {\n    \"allow\": [\n      \"WebSearch\"\n    ],\n    \"deny\": [],\n    \"ask\": []\n  }\n}\n```\n\nYou can modify this file to customize Claude Code's permissions for your `ask` sessions. For example, you might want to allow additional tools like:\n\n- `\"Bash(command --with args)\"` - to run certain shell commands\n- `\"WebFetch(domain:example.com)\"` - to allow fetching web pages from certain domains\n\nEdit the file at `~/.claude-ask/.claude/settings.local.json` to adjust permissions to your needs. Remember that these permissions only apply to the isolated `ask` environment, not your regular Claude Code usage.\n\n## Uninstall\n\n- bash: remove the `ask` function block from `~/.bashrc` and restart your shell.\n- zsh: remove the `ask` function block from `~/.zshrc` and restart your shell.\n- fish: delete `~/.config/fish/functions/ask.fish` and restart fish.\n- optional: remove the workspace: `rm -rf ~/.claude-ask`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnapse%2Fask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fask/lists"}