Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cli flag to configure base directory of srcbooks #429

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ShikherVerma
Copy link

Fixes #187

Changes

Building on the work in #180 I've added another flag to be able to configure the base directory.

Usecase

I want to create a github repo of srcbook files. Each file is a different prompt engineering experiment.
I need different members of the team to pull the latest experiments and share their work.

Possible enhancements

  • Currently each scrbook is stored as a random hash 30v2av4eee17m59dg2c29758to if this could be improved. For example with a date prefix, 2024-10-29-30v2av4eee17m59dg2c29758to that would help a bit.
  • The UI could have an option to group srcbooks into folders.

@nichochar
Copy link
Contributor

Hey @ShikherVerma thanks for the contribution. I'm looking at this but it's going to take a bit of time to QA and make sure things work as expected, since we make some assumptions about directories in different places.

I'm checking out your changes and looking at them on a local build before I approve this or come back with more comment.

Did you test this? If yes, what testing did you do?

@ShikherVerma
Copy link
Author

since we make some assumptions about directories in different places.

The codebase does include hardcoded references to .srcbooks

Did you test this? If yes, what testing did you do?

This commits ads a -b flag to change the base directory. I'm now using srcbook like this:

pnpm run start -- -b "/Users/shikher/projects/spt/prompts"

prompts folder is git tracked and shared with my team. Earlier all files were stored in home directory which is fine for personal use but not good for collaboration on these files.
With this change the .srcbooks folder is created in the prompts dir, not in home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to set Base Directory
2 participants