The number of main-sequence stars for which we can observe solar-like oscillations is expected to increase considerably with the short-cadence high-precision photometric observations from the NASA Kepler satellite. Because of this increase in number of stars, automated tools are needed to analyse these data in a reasonable amount of time. In the framework of the asteroFLAG consortium, we present an automated pipeline which extracts frequencies and other parameters of solar-like oscillations in main-sequence and subgiant stars. The pipeline uses only the timeseries data as input and does not require any other input information. Tests on 353 artificial stars reveal that we can obtain accurate frequencies and oscillation parameters for about three quarters of the stars. We conclude that our methods are well suited for the analysis of main-sequence stars, which show mainly p-mode oscillations.