أداة سطر الأوامر (و TUI) لإنشاء مطالبات LLM من الكود الخاص بك باستخدام قوالب المقابض.
كان هذا مشروعًا للفرشاة على الصدأ ويستند إلى Code2Prompt مع بعض الوظائف الإضافية التي وجدتها مفيدة.
يدويًا نسخ ومقتطفات الرمز والرمز يدويًا إلى LLMS لديها العديد من المشكلات:
للحصول على أقصى استفادة من LLMS ، يجب أن يكون المطالبة واضحة وشاملة ومتسقة. كيف يطالب الكود بإصلاح هذه المشكلات:

يتضمن المشروع أيضًا مجموعة اختيارية لـ TUI حيث يمكنك توفير ملف تكوين لتجاوز العلامات المختلفة ومعرفة كيفية تنظيم الأمر قبل تشغيله.
لتنزيل واستخدام أداة سطر الأوامر CodePrompts ، لديك خياران: يمكنك تنزيل الإصدار الثنائي أو التجميع من المصدر. للحصول على المزيد من الخطوات التفصيلية ، بما في ذلك إعداد إكمال علامات التبويب ، راجع دليل الإعداد.
لتنزيل إصدار ثنائي ، انتقل إلى الإصدارات وقم بتنزيل الثنائي لنظام التشغيل الخاص بك.
ملاحظة : من أجل استخدام Tui Binary ، سيتعين عليك إضافة CLI ثنائي إلى طريقك وإما:
codepromptللبناء من المصدر ، ستحتاج إلى تثبيت GIT و RUST و CARGO (سيتم تثبيتها باستخدام RACT).
أول استنساخ المستودع:
git clone [email protected]:seankim658/codeprompts.gitثم تجميع إصدار ثنائي:
cd codeprompts/
cargo build --releaseيمكن العثور على أدلة استخدام أكثر تفصيلاً هنا.
يمكن العثور على المزيد من الوثائق الشاملة حول الخيارات هنا. تحتوي أداة سطر أوامر Code Prodess على الوسائط التالية:
Create standardized LLM prompts from your code
Usage: codeprompt [OPTIONS] [PATH] [COMMAND]
Commands:
completion Generate shell completion scripts.
help Print this message or the help of the given subcommand(s)
Arguments:
[PATH] Path to project directory
Options:
--include <INCLUDE> Glob patterns to include
--exclude <EXCLUDE> Glob patterns to exclude
--exclude-priority Change pattern priority in case of conflict to prioritize the exclusion pattern
--exclude-from-tree Eclude files/folders from the source tree based on exclude patterns
--gitignore Don't respect .gitignore file
-d, --diff-staged Capture the git diff for staged changes only (equivalent to running `git diff --cached` or `git diff --staged`
-u, --diff-unstaged Capture the git diff for unstaged changes only (equivalent to running `git diff`)
--no-tokens Don't display approximate token count of the genrated prompt
-c, --encoding <ENCODING> Tokenizer to use for token count [default: cl100k]
-o, --output <OUTPUT> Redirect output to file
-l, --no-line-numbers Turn off line numbers in source code blocks
--no-codeblock Disable wrapping code inside markdown code blocks
--relative-paths Use relative paths instead of absolute paths, including parent directory
--no-clipboard Disable copying to clipboard
-t, --template <TEMPLATE> Optional path to Handlebars template
--no-spinner Whether to render the spinner
--json Whether to print the output as JSON. Defaults to False
--issue <ISSUE> Fetch a specific Github issue for the repository
--verbose Run in verbose mode to investigate glob pattern matching
-h, --help Print help (see more with '--help')
-V, --version Print versionتستخدم القوالب لغة templating بسيطة تسمى المقاود.
يمكن تنزيل القوالب المحددة مسبقًا من إصدارات المشروع. قم بتنزيل templates.zip .
حاليا ، القوالب المضمّنة مسبقًا هي:
| اسم قالب | وصف |
|---|---|
default_template.hbs | هذا قالب افتراضي بسيط من شأنه أن ينشط مسار المشروع ، وشجرة المصدر ، وكتل الرمز. |
documentation_template.hbs | ينشئ قالب الوثائق موجهًا لتوثيق الرمز. تتوافق إرشادات الوثائق مع إرشادات مختبر Hive ومتطلبات الوثائق. |
git_commit.hbs | قالب لإنشاء رسالة موجزة ودقيقة GIT الالتزام. يمكن استخدامها مع كل من الخيارات diff-staged diff-unstaged . |
git_issues.hbs | قالب لتنفيذ التغييرات بناءً على قضية جيثب. |
code_optimization.hbs | قالب لتحسين التعليمات البرمجية في التعقيد الزمني والمكان. |