오늘 자정에 저는 한 번도 해본 적이 없는 일을 해냈습니다. 즉, 내 프로그램 gimme_readme를 전 세계가 사용할 수 있도록 npm 레지스트리에 게시하는 것입니다!
gimme_readme 명령줄 도구는 사용자의 로컬 소스 코드 파일을 가져와 이를 사용하여 코드를 설명하는 README.md 파일을 만듭니다. gimme_readme를 사용하면 다양한 AI API(예: Gemini의 gemini-1.5-flash 모델 및 Groq의 llama3-8b-8192 모델)를 선택하여 제공된 코드를 분석하고 코드를 설명하는 문서를 생성할 수 있습니다.
gimme_readme에 대해 자세히 알아보려면 아래 저장소를 확인하거나 저장소에도 링크되어 있는 0.1 릴리스 데모를 시청하시기 바랍니다.
피터단완
/
gimme_readme
gimme_readme
gimme_readme는 프로젝트에 대한 포괄적인 README.md 파일을 생성하는 AI 기반 명령줄 도구입니다. 여러 소스 코드 파일을 한 번에 분석하여 각 파일의 목적, 기능 및 주요 구성 요소에 대한 간결한 설명을 읽기 쉬운 단일 문서로 제공합니다. 이렇게 하면 다른 사람들이 귀하의 프로젝트에 더 쉽게 접근하고 이해할 수 있습니다.
0.1 릴리스 데모를 확인하세요!
목차
- 시작하기
- 사용방법
- 사용예
- 공급자 지원 모델
- 기여
- 작가
1. 시작하기
gimme_readme를 시작하려면 다음 단계를 따르세요.
-
운영 체제에 맞는 최신 버전의 Node.js를 설치하세요.
-
gimme_readme를 전역적으로 설치하려면 다음 명령을 실행하세요.
npm i -g gimme_readme
참고: MAC/LINUX 사용자는 sudo npm i -g gimme_readme를 실행해야 할 수도 있습니다
-
원하는 모든 폴더에서 실행하여 구성 파일을 생성하세요.
gr-ai -c
이 명령은 홈 디렉터리에 .gimme_readme_config 파일을 생성합니다. 이 파일을 이 위치에서 이동하지 마세요.
…
Table of Contents
- Developing gimme_readme
- Getting started with gimme_readme
- Features of gimme_readme
- Example usage
- Conclusion
- Links
Developing gimme_readme
"Stand on the shoulders of giants"
This quote echoed in my head as I was creating my command-line tool since I know very well that without the work of many other companies and distinct individuals, I would not be able to release my own project.
To that end, let me delve into some of the technologies I used to create gimme_readme.
To start, I knew I wanted to work with JavaScript because of its simple syntax, and its ability to run on Linux, Mac, and Windows. Since cross-platform availability is something I value, I knew I wanted to work with JavaScript from the start.
After choosing JavaScript as the programming language I'd write in, I thought about how I would publish my code. The first thought that came to mind was npm. npm or the node package manager is the largest open source registry in the world. People from around the world use code from npm and share their code to npm and the process of using npm is very straightforward.
When I started my computer science journey in 2022, I was fascinated with how easy it was to just write:
npm i NPM_PACKAGE
and my code would magically work. I was even more impressed when I found out that the packages that were installed (if they were maintained correctly), were able to be installed on different operating systems.
To show you how easy node / npm's ecosystem is, let me show you how easy it is to make your JavaScript code into an executable that runs on every operating system.
You can make your script executable by adding a line similar to this to your package.json file:
{ "bin": { // Makes an executable called "gr-ai" which simply calls my JS script "gr-ai": "./src/_gr.js" } }
How neat is that? With just a few lines of code (minus my comment), you are halfway done with making an executable called gr-ai which calls ./src/_gr.js that can run on all operating systems.
The final piece of the puzzle for making an executable is simulating how you would publish your code OR publishing your code for real.
To simulate publishing your code, run the following command in the root of your JavaScript project (i.e., where your package.json is):
npm link
This command simulates you having installed your program globally and will give you access to your own gr-ai command!
In the event that you no longer want to have the code for this command installed globally (whether it be your simulated code / code that you installed globally via npm), you can run:
npm uninstall -g gimme_readme
Please note, that you need to specify the name of your package when uninstalling and not the name of your executable.
I had to simulate publishing my code several times before actually publishing it to npm. For a really good guide on publishing your code to the npm registry, I suggest watching Web Dev Simplified's video on creating and publishing your first npm package.
With direction on how I'd publish my code, I was able to start thinking about all the different dependencies I would need to get my program to work.
The dependencies and packages I'm currently using for gimme_readme are:
- @google/generative-ai & groq/sdk, which give me access to different LLMs that will help explain the user's source code
- commander, which made it easy to configure the different options of my command-line tool
- chalk, which allows me to colourize my command-line text
- dotenv, which helps me work with secret files that store sensitive information
- ora, which gives code that produces a loading spinner
It was with these great APIs and libraries that I was able to produce a tool of my own. With that said, let me show you how you can get started with gimme_readme so you can make heads or tails of your local source code files.
Getting started with gimme_readme
To get started with gimme_readme, follow these steps:
1. Install the latest version of Node.js for your operating system
The download for Node.js can be found here: https://nodejs.org/en/download/package-manager.
Node.js will come with npm and allow you to install gimme_readme.
2. Run the following command to install gimme_readme globally
npm i -g gimme_readme
NOTE: MAC/LINUX users may need to run sudo npm i -g gimme_readme
3. Generate a configuration file by running in any folder you'd like
gr-ai -c
This command creates a .gimme_readme_config file in your home directory. Do not move this file from this location.
Follow the instructions in the file to create your own API keys and set your own default values.
Congratulations! You just installed gimme_readme to your system and if you created your own API keys, you should be able to use gimme_readme on the command-line!
With installation out of the way, let's delve into how you can use gimme_readme.
Features of gimme_readme
At a top level, gimme_readme supports the following features:
- The ability to display a help page.
- The ability to get gimme_readme's version number.
- The ability to create a .gimme_readme_config file or locate it
- The ability to send it source files, and have an AI model provide an explanation for your source code files.
- The ability to choose where the AI model's explanation is outputted (i.e., to a file or to your terminal).
- The ability to specify the AI model that provides explanations for you.
- The ability to send your own custom AI prompt.
- The ability to set the temperature of your model (i.e., how deterministic you want your model's response to be).
Let's show you demonstrations of each feature.
Example usage
Display the help page
The most basic gimme_readme command is:
gr-ai
This shows us how use gr-ai and its different options.
Display the version number
Providing the -v option to the gr-ai command returns the version number
gr-ai -v
Create a .gimme_readme_config file or find the path to your existing one
gr-ai -c
Takes several input files, choose your LLM of choice, and outputs the selected LLM's response to a file
# file file model output file gr-ai -f .prettierignore .gitignore -m gemini-1.5-flash -o explain.md
Conclusion
If you made it this far, I'd like to thank you for giving this blog a read. Creating the 0.1 release of gimme_readme has been a great experience, and I’m excited to continue developing new features and improving the tool. If you're interested in trying it out or contributing, feel free to check out the GitHub repository.
Stay tuned for more updates in the coming weeks!
Links
- GitHub Repository: gimme_readme
- Demo Video: Watch the 0.1 Release Demo
위 내용은 개발 로그: gimme_readme 릴리스의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

JavaScript 문자열 교체 방법 및 FAQ에 대한 자세한 설명 이 기사는 JavaScript에서 문자열 문자를 대체하는 두 가지 방법 인 내부 JavaScript 코드와 웹 페이지의 내부 HTML을 탐색합니다. JavaScript 코드 내부의 문자열을 교체하십시오 가장 직접적인 방법은 대체 () 메소드를 사용하는 것입니다. str = str.replace ( "find", "replace"); 이 메소드는 첫 번째 일치 만 대체합니다. 모든 경기를 교체하려면 정규 표현식을 사용하고 전역 플래그 g를 추가하십시오. str = str.replace (/fi

그래서 여기 당신은 Ajax라는이 일에 대해 배울 준비가되어 있습니다. 그러나 정확히 무엇입니까? Ajax라는 용어는 역동적이고 대화식 웹 컨텐츠를 만드는 데 사용되는 느슨한 기술 그룹을 나타냅니다. 원래 Jesse J에 의해 만들어진 Ajax라는 용어

10 재미있는 jQuery 게임 플러그인 웹 사이트를보다 매력적으로 만들고 사용자 끈적함을 향상시킵니다! Flash는 여전히 캐주얼 웹 게임을 개발하기위한 최고의 소프트웨어이지만 JQuery는 놀라운 효과를 만들 수 있으며 Pure Action Flash 게임과 비교할 수는 없지만 경우에 따라 브라우저에서 예기치 않은 재미를 가질 수 있습니다. jQuery tic 발가락 게임 게임 프로그래밍의 "Hello World"에는 이제 jQuery 버전이 있습니다. 소스 코드 jQuery Crazy Word Composition 게임 이것은 반은 반은 게임이며, 단어의 맥락을 알지 못해 이상한 결과를 얻을 수 있습니다. 소스 코드 jQuery 광산 청소 게임

이 튜토리얼은 jQuery를 사용하여 매혹적인 시차 배경 효과를 만드는 방법을 보여줍니다. 우리는 멋진 시각적 깊이를 만드는 계층화 된 이미지가있는 헤더 배너를 만들 것입니다. 업데이트 된 플러그인은 jQuery 1.6.4 이상에서 작동합니다. 다운로드

기사는 JavaScript 라이브러리 작성, 게시 및 유지 관리, 계획, 개발, 테스트, 문서 및 홍보 전략에 중점을 둡니다.

이 기사는 브라우저에서 JavaScript 성능을 최적화하기위한 전략에 대해 설명하고 실행 시간을 줄이고 페이지로드 속도에 미치는 영향을 최소화하는 데 중점을 둡니다.

이 기사에서는 jQuery 및 Ajax를 사용하여 5 초마다 DIV의 컨텐츠를 자동으로 새로 고치는 방법을 보여줍니다. 이 예제는 RSS 피드의 최신 블로그 게시물을 마지막 새로 고침 타임 스탬프와 함께 가져오고 표시합니다. 로딩 이미지는 선택 사항입니다

Matter.js는 JavaScript로 작성된 2D 강성 신체 물리 엔진입니다. 이 라이브러리를 사용하면 브라우저에서 2D 물리학을 쉽게 시뮬레이션 할 수 있습니다. 그것은 단단한 몸체를 생성하고 질량, 면적 또는 밀도와 같은 물리적 특성을 할당하는 능력과 같은 많은 기능을 제공합니다. 중력 마찰과 같은 다양한 유형의 충돌 및 힘을 시뮬레이션 할 수도 있습니다. Matter.js는 모든 주류 브라우저를 지원합니다. 또한, 터치를 감지하고 반응이 좋기 때문에 모바일 장치에 적합합니다. 이러한 모든 기능을 사용하면 엔진 사용 방법을 배울 수있는 시간이 필요합니다. 이는 물리 기반 2D 게임 또는 시뮬레이션을 쉽게 만들 수 있습니다. 이 튜토리얼에서는 설치 및 사용을 포함한이 라이브러리의 기본 사항을 다루고


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

Eclipse용 SAP NetWeaver 서버 어댑터
Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

Atom Editor Mac 버전 다운로드
가장 인기 있는 오픈 소스 편집기

PhpStorm 맥 버전
최신(2018.2.1) 전문 PHP 통합 개발 도구
