Skip to content

[FEATURE] Create standalone cocoindex CLI #417

@badmonster0

Description

@badmonster0

The current CocoIndex CLI is provided as part of users' application by cocoindex.main_fn() (as described here).

We may want to create a standalone CLI. It will provide the following benefits:

  • A little bit easier to type. e.g. cocoindex update main.py instead of python main.py cocoindex update.
  • Provide a more natural entrypoint for global tasks, e.g. list all flows by cocoindex ls.
  • Less intrusive for users own application logic - they can more freely take CLI arguments upon their requirements, e.g. if their CLI takes a filename as argument like main.py $FILENAME, in the current way cocoindex cannot be the filename.

Existing example of standalone CLI taking users module as input: FastAPI CLI


❤️ Contributors, please refer to 📙Contributing Guide.
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededpython-sdkCocoIndex Python SDK

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions