Simon Willison’s Weblog

Subscribe

Wednesday, 19th February 2025

files-to-prompt 0.6. New release of my CLI tool for turning a whole directory of code into a single prompt ready to pipe or paste into an LLM.

Here are the full release notes:

  • New -m/--markdown option for outputting results as Markdown with each file in a fenced code block. #42
  • Support for reading a list of files from standard input. Thanks, Ankit Shankar. #44
    Here's how to process just files modified within the last day:

    find . -mtime -1 | files-to-prompt
    

    You can also use the -0/--null flag to accept lists of file paths separated by null delimiters, which is useful for handling file names with spaces in them:

    find . -name "*.txt" -print0 | files-to-prompt -0
    

I also have a potential fix for a reported bug concerning nested .gitignore files that's currently sitting in a PR. I'm waiting for someone else to confirm that it behaves as they would expect. I've left details in this issue comment, but the short version is that you can try out the version from the PR using this uvx incantation:

uvx --with git+https://github.com/simonw/files-to-prompt@nested-gitignore files-to-prompt

# 6:12 am / uv, projects, annotated-release-notes, llms

Meanwhile blogging has become small-p political again.

Slowly, slowly, the web was taken over by platforms. Your feeling of success is based on your platform’s algorithm, which may not have your interests at heart. Feeding your words to a platform is a vote for its values, whether you like it or not. And they roach-motel you by owning your audience, making you feel that it’s a good trade because you get “discovery.” (Though I know that chasing popularity is a fool’s dream.)

Writing a blog on your own site is a way to escape all of that. Plus your words build up over time. That’s unique. Nobody else values your words like you do.

Blogs are a backwater (the web itself is a backwater) but keeping one is a statement of how being online can work. Blogging as a kind of Amish performance of a better life.

Matt Webb, Reflections on 25 years of Interconnected

# 1:50 pm / matt-webb, blogging, social-media

Can I still use my Ai Pin for offline features?

Yes. After February 28, 2025, Ai Pin will still allow for offline features like battery level, etc., but will not include any function that requires cloud connectivity like voice interactions, AI responses, and .Center access.

Ai Pin Consumers FAQ, on their shutdown after sale to HP

# 3:34 pm / ai

Using S3 triggers to maintain a list of files in DynamoDB. I built an experimental prototype this morning of a system for efficiently tracking files that have been added to a large S3 bucket by maintaining a parallel DynamoDB table using S3 triggers and AWS lambda.

I got 80% of the way there with this single prompt (complete with typos) to my custom Claude Project:

Python CLI app using boto3 with commands for creating a new S3 bucket which it also configures to have S3 lambada event triggers which moantian a dynamodb table containing metadata about all of the files in that bucket. Include these commands

  • create_bucket - create a bucket and sets up the associated triggers and dynamo tables
  • list_files - shows me a list of files based purely on querying dynamo

ChatGPT then took me to the 95% point. The code Claude produced included an obvious bug, so I pasted the code into o3-mini-high on the basis that "reasoning" is often a great way to fix those kinds of errors:

Identify, explain and then fix any bugs in this code:

code from Claude pasted here

... and aside from adding a couple of time.sleep() calls to work around timing errors with IAM policy distribution, everything worked!

Getting from a rough idea to a working proof of concept of something like this with less than 15 minutes of prompting is extraordinarily valuable.

This is exactly the kind of project I've avoided in the past because of my almost irrational intolerance of the frustration involved in figuring out the individual details of each call to S3, IAM, AWS Lambda and DynamoDB.

(Update: I just found out about the new S3 Metadata system which launched a few weeks ago and might solve this exact problem!)

# 10:07 pm / lambda, uv, ai, llms, ai-assisted-programming, generative-ai, s3, aws, nosql, o3, chatgpt, claude

2025 » February

MTWTFSS
     12
3456789
10111213141516
17181920212223
2425262728