% Set project to current folder
function set(d)
    if ~exist('d', 'var') || isempty(d)
        d = pwd;
    end

    state = mpm.load_state();

    sp = mpm.subpaths(d);
    for i = 1:length(sp)
        subpath = fullfile(pwd, sp{i});
        addpath(subpath);
        state.added_paths(subpath) = true;
    end

    mpm.save_state(state);
end
