Open
Conversation
Added its required fields in index.js. Does work in cli but does not take input yet
Aditya-Chowdhary
requested changes
Jun 21, 2025
Member
Aditya-Chowdhary
left a comment
There was a problem hiding this comment.
Looks good for now for the add snippet one. Now make the similar structure for delete snippet, edit, list, and view snippets.Think about the required details that the user would need to input and create the similar configuration
index.js
Outdated
| .description('Add your code snippet in the language of your choice') | ||
| .option('-l,--lang<language>','specify the programming language') | ||
| .option('-d,--desc<description>','describe the code snippet') | ||
| .option('-f,--file<path>','Path to the file containting the snippet') |
Member
There was a problem hiding this comment.
spelling: containing instead of containting
Member
There was a problem hiding this comment.
For the options which are compulsory, such as path to file containing snippet, lang, maybe description, consider making them requiredOptions or similar so that if they aren't given the program will throw an error.
tested for bugs
Added new file 'snippet.json' to store the Snippets
…mented out). also storing snippets locally in snippet.json
…ags and any specific keywords
…us search function for now)
sidhant-sriv
reviewed
Aug 8, 2025
| # server with the `prisma dev` CLI command, when not choosing any non-default ports or settings. The API key, unlike the | ||
| # one found in a remote Prisma Postgres URL, does not contain any sensitive information. | ||
|
|
||
| DATABASE_URL="postgresql://postgres.wgxbziqzoxkhmhvrqaee:Samsamdatabase1212@aws-0-us-east-2.pooler.supabase.com:5432/postgres" No newline at end of file |
sidhant-sriv
reviewed
Aug 8, 2025
Comment on lines
+83
to
+84
| console.error("❌ Provided file does not exist."); | ||
| process.exit(1); |
Comment on lines
+114
to
+117
| console.log(`\n${i + 1}. ${s.name} [${s.lang}]`); | ||
| console.log(`📄 ${s.desc}`); | ||
| console.log(`📁 ${s.file}`); | ||
| console.log(`🏷️ ${s.tags?.join(", ")}`); |
Comment on lines
+133
to
+138
| console.log(`\n📌 Name: ${snippet.name}`); | ||
| console.log(`🖋️ Language: ${snippet.lang}`); | ||
| console.log(`📝 Description: ${snippet.desc}`); | ||
| console.log(`📁 File: ${snippet.file}`); | ||
| console.log(`🏷️ Tags: ${snippet.tags?.join(", ")}`); | ||
| console.log(`\n📄 Code:\n${snippet.code}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit message
Added "add snippet" feature.
Added its required fields in index.js.
Does work in cli but does not take input yet.