{"id":17460978,"url":"https://github.com/0xthierry/llama-parse-cli","last_synced_at":"2025-04-13T06:40:28.176Z","repository":{"id":247660986,"uuid":"825754309","full_name":"0xthierry/llama-parse-cli","owner":"0xthierry","description":"A non-official CLI for Llama Index Parser","archived":false,"fork":false,"pushed_at":"2024-07-11T23:22:54.000Z","size":553,"stargazers_count":203,"open_issues_count":3,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-18T09:13:57.253Z","etag":null,"topics":["llama-index","llama-parse"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xthierry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-07-08T12:35:51.000Z","updated_at":"2024-10-15T13:58:10.000Z","dependencies_parsed_at":"2024-07-12T01:24:56.481Z","dependency_job_id":null,"html_url":"https://github.com/0xthierry/llama-parse-cli","commit_stats":null,"previous_names":["0xthierry/llama-parse-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xthierry%2Fllama-parse-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xthierry%2Fllama-parse-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xthierry%2Fllama-parse-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xthierry%2Fllama-parse-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xthierry","download_url":"https://codeload.github.com/0xthierry/llama-parse-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"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","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":["llama-index","llama-parse"],"created_at":"2024-10-18T06:41:06.031Z","updated_at":"2025-04-13T06:40:28.151Z","avatar_url":"https://github.com/0xthierry.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Llama Parse CLI\n\nA non-official command-line interface (CLI) for parsing documents using the LlamaIndex Parser.\n\n## Installation\n\nTo install the llama-parse-cli, you need to have Node.js and npm installed on your system. Then, you can install it globally using:\n\n```sh\nnpm install -g llama-parse-cli\n```\n\n## Usage\n\nThe CLI provides two main commands: `auth` and `parse`.\n\n### Authentication\n\nBefore using the parse functionality, you need to authenticate with your API key:\n\n```sh\nllama-parse auth\n```\n\n\u003cimg src=\"./screenshots/add-auth.png\" /\u003e\n\nThis command will prompt you to enter your API key, which should start with \"llx-\". The key will be securely stored in `~/.llama-parse/config.json`.\n\n### Parsing Documents\n\nTo parse a document, use the `parse` command:\n\n```sh\nllama-parse parse \u003cfile\u003e [options]\n```\n\n#### Options:\n\n- `-f, --format \u003cformat\u003e`: Output format (json, markdown, text). Default: markdown\n- `-o, --output \u003coutput\u003e`: The output file\n- `-ol, --ocr-language \u003cocr-language\u003e`: The language of the document\n- `-pi, --parsing-instructions \u003cparsing-instructions\u003e`: The parsing instructions\n- `-ps, --page-separator \u003cpage-separator\u003e`: The page separator\n- `-sd, --skip-diagonal-text`: Skip diagonal text\n- `-ic, --invalidate-cache`: Invalidate cache\n- `-dc, --do-not-cache`: Do not cache\n- `-dnc, --do-not-unroll-columns`: Do not unroll columns\n- `-fm, --fast-mode`: Fast mode\n- `-gpt4o, --gpt-4o`: Use GPT-4o\n- `-tp, --target-pages \u003ctarget-pages\u003e`: The target pages (comma-separated list, starting from 0)\n- `-v, --verbose`: Verbose mode\n\n## Examples\n\n1. Parse a PDF file and output in markdown format:\n```sh\nllama-parse parse example/sample-pdf.pdf\n```\n\n2. Parse a document and save the output to a file:\n```sh\nllama-parse parse example/sample-pdf.pdf -o output.md\n```\n\n3. Parse specific pages of a document:\n```sh\nllama-parse parse example/sample-pdf.pdf -tp 0\n```\n\n4. Parse a document in verbose mode:\n```sh\nllama-parse parse example/sample-pdf.pdf -v\n```\n\n\u003cimg src=\"./screenshots/parse-file.png\" /\u003e\n\n## Development\n\nThe project is built using TypeScript and uses the following key dependencies:\n\n- Commander.js for CLI argument parsing\n- Zod for input validation\n- Inquirer for interactive prompts\n- Ora for spinner animations\n- Chalk for colorful console output\n\nTo set up the development environment:\n\n1. Clone the repository\n2. Run `pnpm install` to install dependencies\n3. Use `pnpm dev` to run the CLI in development mode\n4. Use `pnpm build` to build the project\n5. Use `pnpm link .` to link the CLI globally\n\nThe main entry point is in `src/index.ts`:\n\n```ts\n#!/usr/bin/env node\nimport { version } from \"../package.json\";\nimport { program } from \"commander\";\nimport { createAuthCommand, createParseCommand } from \"./commands\";\n\nprogram\n  .name(\"llama-parse\")\n  .addCommand(createAuthCommand())\n  .addCommand(createParseCommand())\n  .description(\"A CLI for parsing documents with llama parse\")\n  .version(`${version}`);\n\nprogram.parse(process.argv);\n```\n\nThe CLI commands are defined in separate files under the `src/commands` directory:\n\n```ts\nexport { createAuthCommand } from \"./auth\";\nexport { createParseCommand } from \"./parse\";\n```\n\n## Contributing\n\nContributions to the llama-parse-cli are welcome. Please ensure that your code adheres to the existing style and includes appropriate tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xthierry%2Fllama-parse-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xthierry%2Fllama-parse-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xthierry%2Fllama-parse-cli/lists"}